home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / text / edit / vim46src.lha / vim-4.6 / vimrc < prev   
Text File  |  1997-02-17  |  2KB  |  40 lines

  1. " An example for a vimrc file.
  2. "
  3. " To use it, copy it to
  4. "     for Unix and OS/2:  ~/.vimrc
  5. "             for Amiga:  s:.vimrc
  6. "  for MS-DOS and Win32:  $VIM\_vimrc
  7.  
  8. version 4.0        " avoid warning for wrong version
  9.  
  10. set bs=2        " allow backspacing over everything in insert mode
  11. set ai            " always set autoindenting on
  12. set tw=78        " always limit the width of text to 78
  13. set backup        " keep a backup file
  14. set viminfo='20,\"50    " read/write a .viminfo file, don't store more
  15.             " than 50 lines of registers
  16.  
  17. " When starting to edit a file:
  18. "   For *.c and *.h files set formatting of comments and set C-indenting on
  19. "   For other files switch it off
  20. "   Don't change the sequence, it's important that the line with * comes first.
  21. autocmd BufRead * set formatoptions=tcql nocindent comments&
  22. autocmd BufRead *.c,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
  23.  
  24. " Enable editing of gzipped files
  25. "    read: set binary mode before reading the file
  26. "          uncompress text in buffer after reading
  27. "   write: compress file after writing
  28. "  append: uncompress file, append, compress file
  29. autocmd BufReadPre,FileReadPre      *.gz set bin
  30. autocmd BufReadPost,FileReadPost    *.gz '[,']!gunzip
  31. autocmd BufReadPost,FileReadPost    *.gz set nobin
  32.  
  33. autocmd BufWritePost,FileWritePost  *.gz !mv <afile> <afile>:r
  34. autocmd BufWritePost,FileWritePost  *.gz !gzip <afile>:r
  35.  
  36. autocmd FileAppendPre            *.gz !gunzip <afile>
  37. autocmd FileAppendPre            *.gz !mv <afile>:r <afile>
  38. autocmd FileAppendPost            *.gz !mv <afile> <afile>:r
  39. autocmd FileAppendPost            *.gz !gzip <afile>:r
  40.